

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Add Code Modules [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, Add,Add Code Modules In MDG Technology Wizard,MDG Technology Wizard,MDG Technology Wizard Add Code Modules">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Add Code Modules</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="addingtaggedvaluesinmdgte.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="adding_mda_transforms_in_mdg_t.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">When creating an MDG Technology file, you can include code modules. To use the </span><span class="f_UIControl">Code Modules</span><span class="f_BodyText"> section of the MDG Technology Wizard, follow the steps below:</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=1><span class="f_NumberedList">Follow the steps in the </span><span class="f_NumberedList" style="font-style: italic;"><a href="creatingmdgtechnologies.htm">Create MDG Technologies</a></span><span class="f_NumberedList"> topic up to and including <a href="creatingmdgtechnologies.htm#CreateMDGTech">Step 5</a>.</span></li>
<li value=2><span class="f_NumberedList">In the </span><span class="f_UIControl">Select Items to be included in this Technology</span><span class="f_NumberedList"> panel, select the </span><span class="f_MenuKeyField">Code Modules</span><span class="f_NumberedList"> checkbox. The </span><span class="f_UIControl">MDG Technology Wizard - Code Modules</span><span class="f_NumberedList"> dialog displays.</span><br>
<span class="f_NumberedList">&nbsp;</span><br>
<img src="mdgwizardcode.png" width="441" height="353" border="0" alt="MDGWizardCode"><br>
<span class="f_NumberedList">&nbsp;</span></li>
<li value=3><span class="f_NumberedList">Select the checkbox against each of the appropriate Code Modules (</span><span class="f_MenuKeyField">Product</span><span class="f_NumberedList">, </span><span class="f_MenuKeyField">Data Types</span><span class="f_NumberedList">, and </span><span class="f_MenuKeyField">Code Templates</span><span class="f_NumberedList">).</span></li>
</ol>
<div style="text-align: left; text-indent: -21px; padding: 0px 0px 0px 0px; margin: 5px 0px 0px 48px;"><table cellspacing="0" cellpadding="2" border="0" style="border: none; border-spacing:0px;">
<tr style="text-align:left;vertical-align:bottom;">
<td valign="bottom" width="955" bgcolor="#efeff7" style="width:955px; background-color:#efeff7;"><p class="p_TiporNote" style="border-top: none; border-right: none; border-left: none;"><span class="f_TiporNote">Note:</span></p>
</td>
</tr>
<tr style="text-align:left;">
<td width="955" bgcolor="#f7f7ff" style="width:955px; background-color:#f7f7ff;"><p class="p_TiporNoteText"><span class="f_TiporNoteText">The code modules listed are those defined in your current project. These could be the Enterprise Architect default languages, or those you have defined yourself using <a href="codetemplatesoverview.htm">code templates</a> and the <a href="thecodetemplateeditor.htm">Code Template Editor</a>. Before you can set up a code template for the new language in the editor, you must define at least one <a href="datatypes.htm">data type</a> for the language. Once the MDG Technology file is created it can be loaded into your current model and into other models.</span></p>
</td>
</tr>
</table>
</div>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=4><span class="f_NumberedList">To select the </span><span class="f_MenuKeyField">Code Options</span><span class="f_NumberedList">, click on the </span><span class="f_MenuKeyField">[ ... ] </span><span class="f_NumberedList">button against each required code option. </span><span class="f_NumberedList">This enables you to select an XML document that provides additional settings for the language that are not covered by the data types or code templates.</span><br>
<span style="font-size: 10pt;">&nbsp;</span><br>
<span class="f_NumberedList">The root node of the XML document should be </span><span class="f_Code">CodeOptions</span><span class="f_NumberedList">. The child nodes should be called </span><span class="f_Code">CodeOption</span><span class="f_NumberedList"> and should contain a </span><span class="f_NumberedList" style="font-style: italic;">name</span><span class="f_NumberedList"> attribute. The supported code options are as follows:</span><br>
<span class="f_NumberedList">&nbsp;</span></li>
</ol>
<div style="text-align: left; text-indent: -21px; padding: 0px 0px 0px 0px; margin: 5px 0px 0px 48px;"><table cellspacing="0" cellpadding="0" border="0" style="border: none; border-spacing:0px; border-collapse: collapse;">
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" bgcolor="#e3e6ed" style="width:181px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Code Option</span></p>
</td>
<td valign="top" width="527" bgcolor="#e3e6ed" style="width:527px; background-color:#e3e6ed; border: solid 1px #000000;"><p class="p_Tableheader"><span class="f_Tableheader">Description</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">ConstructorName</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The name of a function used as a constructor. Used by the <a href="fieldsubstitutionmacros.htm">classHasConstructor</a> code template macro.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">CopyConstructorName</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The name of a function used as a copy constructor. Used by the <a href="fieldsubstitutionmacros.htm">classHasCopyConstructor</a> code template macro.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">DefaultExtension</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The default extension when generating code.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">DefaultSourceDirectory</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The default path to which Enterprise Architect generates new files.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">DestructorName</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The name of a function used as a destructor. Used by the <a href="fieldsubstitutionmacros.htm">classHasDestructor</a> code template macro.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">Editor</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The external editor used for editing source of this language.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">ImplementationExtension</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The extension used by Enterprise Architect to generate an implementation file.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">ImplementationPath</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The relative path from the source file to generate the implementation file.</span></p>
</td>
</tr>
<tr style="text-align:left;vertical-align:top;">
<td valign="top" width="181" style="width:181px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">PackagePathSeparator</span></p>
</td>
<td valign="top" width="527" style="width:527px; border: solid 1px #000000;"><p class="p_Tabletext"><span class="f_Tabletext">The delimiter used to separate package names when using the </span><span class="f_Tabletext" style="font-style: italic;">packagePath</span><span class="f_Tabletext"> macro from the code templates.</span></p>
</td>
</tr>
</table>
</div>
<p class="p_NumberedList"><span class="f_NumberedList">&nbsp;</span><br>
<span class="f_NumberedList">An example of a valid code options file is shown below.</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code">&nbsp;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code">&lt;CodeOptions&gt;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code"> &lt;CodeOption name=&quot;DefaultExtension&quot;&gt;.ext&lt;/CodeOption&gt;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code"> &lt;CodeOption name=&quot;Editor&quot;&gt;C:\Windows\notepad.exe&lt;/CodeOption&gt;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code">&lt;/CodeOptions&gt;</span></p>
<p class="p_Code" style="margin: 0px 0px 0px 50px;"><span class="f_Code">&nbsp;</span></p>
<ol style="text-indent: 0px; margin-left: 48px; list-style-position: outside;">
<li value=5><span class="f_NumberedList">Click on the </span><span class="f_MenuKeyField">Next</span><span class="f_NumberedList"> button to proceed.</span></li>
</ol>
<p class="p_BodyText"><span class="f_BodyText">You can edit the code option values for <a href="codeengineeringsettings.htm">source code engineering</a> and for each required language using the </span><span class="f_UIControl"><a href="languageoptions.htm">appropriate Language Options</a></span><span class="f_BodyText"> page of the </span><span class="f_UIControl">Options</span><span class="f_BodyText"> dialog.</span></p>




            </div>
          </div>
        </div>



</div>


</body>
</html>
